home *** CD-ROM | disk | FTP | other *** search
- Path: noc.tor.hookup.net!the-fix.sos.on.ca
- From: <verneb@the-fix.sos.on.ca>
- Date: Sun,21 Jan 96 14:45:06 -0500
- Newsgroups: comp.lang.c
- Subject: Help: floating point/use of floor
- Message-ID: <tcpnntpd.16.1.21.14.45.6.2781597121.352666@the-fix.sos.on.ca>
- References: <4dogri$fta@gate.service.britgas.co.uk>
- Organization: the FIX - Kitchener, Ontario CANADA
- NNTP-Posting-Host: the-fix.sos.on.ca
- X-MajorTCP-Version: MajorTCP/IP [1.81-5]
-
- To: INT:andy.crutchlow@servic
-
- Int:andy.crutchlow@servic,
-
- I>Can anyone help.
- I>
- I>Make the following display 75.99
- I>main()
- I>{
- I>int i; /*change to float i;
- I>float f;
- I>i = 7599;
- I>f = i / 100.00;
- I>printf("%f\n",f);/*change to:- printf("%.2f %.2f\n", i, f);
- /* here add:- return 0;
- I>}
- I>/* this should work for you now!*/
- I>I believe the correct answer involves using function floor but I can't
- I>remember how.
- I>
- I>Thanks.
- I>e-mail:- andy.crutchlow@service.britgas.co.uk
- I>
- I>
-
- Verne H. Bohlender
- Box 416, Chesley, Ontario.Ca. N0G 1L0
- verneb@The-Fix.sos.on.ca
- ___
- * UniQWK #2158*
-
-